// 创建实例时配置默认值
import axios from '@ohos/axios'
import token from '../globalData/Token'

console.log("Token: ", token.token);
const instance = axios.create({
  baseURL: 'https://localhost:8083',
  timeout: 1000,
  headers: {
    "token": token.token
  }
});

// 创建实例后修改默认值
instance.defaults.headers.common['token'] = token.token;

export default instance